package com.net.shop.car.manager;

import android.app.Activity;
import android.support.v4.app.Fragment;

/**
 * @description 所有碎片应该继承到基类<br>
 *              提供了碎片常用的对象和方法
 * @author wangpeng
 * @date 2014-12-20
 */
public class BaseFragment extends Fragment {

	/** 碎片持有者 */
	public BaseActivity holder;
	/** 自身當前是否可見 */
	public boolean selfVisible;

	@Override
	public void onAttach(Activity activity) {
		super.onAttach(activity);
		holder = (BaseActivity) activity;
	}

	@Override
	public void onDetach() {
		super.onDetach();
		holder = null;
	}

	@Override
	public void onHiddenChanged(boolean hidden) {
		super.onHiddenChanged(hidden);
		selfVisible = !hidden;
	}

}
